Page({
    data:{
        title:"为了遇见你",
        time:"2019-07-03",
        singer:"薛之谦",
        url:"http://p1.music.126.net/bb_9YWv-r4u84TdgjFusIQ==/109951164795672667.jpg?param=177y177",
        list:[
            {
                id:1430287645,
                videoSrc:"http://link.hhtjim.com/163/1430287645.mp3",
                songname:"为了遇见你",
                name:"薛之谦",
            }
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})